﻿using Microsoft.AspNetCore.Mvc;

namespace _27_log4net.Controllers
{
    public class Log4NetController : Controller
    {
        private readonly ILogger<Log4NetController> _logger;
        public Log4NetController(ILogger<Log4NetController> logger) {
            this._logger = logger;
            this._logger.LogInformation($"{this.GetType().Name}被构造了");
        }
        public IActionResult Index()
        {
            this._logger.LogInformation($"{this.GetType().Name}被执行了");
            return View();
        }
    }
}
